# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: François Charette <francois ατ archlinux δοτ org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=jhead
pkgver=3.06.0.1
pkgrel=1
pkgdesc='EXIF JPEG info parser and thumbnail remover'
url="http://www.sentex.net/~mwandel/jhead/"
arch=('loong64' 'x86_64')
license=('custom')
depends=('glibc')
optdepends=('libjpeg: to up-right images according to rotation tag')
source=(https://github.com/Matthias-Wandel/jhead/archive/$pkgver/$pkgname-$pkgver.tar.gz
        LICENSE)
md5sums=('649538af0ceebdaaed6eb5b87cb43bf0'
         '1f0db611d2642a981719f45252762a45')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  install -Dm755 jhead "${pkgdir}/usr/bin/jhead"
  install -Dm644 jhead.1 "${pkgdir}/usr/share/man/man1/jhead.1"
  install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
